import java.util.Objects;

/**
 * Classname: Student
 * Package: PACKAGE_NAME
 * Description:
 *
 * @Author Alex Liang
 * @Create 2023/7/17 11:31
 * @Version 1.0
 */

public class Student {
    public String name;
    public int id;

    public Student() {
    }

    public Student(String name, int id) {
        this.name = name;
        this.id = id;
    }

    @Override
    public String toString() {
        return "Student{" +
                "name='" + name + '\'' +
                ", id=" + id +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Student student = (Student) o;
        return id == student.id && Objects.equals(name, student.name);
    }


}
